package com.xiaoshuidi.cloud.module.report.dal.mapper.report;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.report.controller.ajreport.vo.LedgerReportReqVO;
import com.xiaoshuidi.cloud.module.report.controller.ajreport.vo.RenewalLedgerReportReqVO;
import com.xiaoshuidi.cloud.module.report.dal.DO.report.ReportLedgerInfoDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
@InterceptorIgnore(tenantLine = "true")
public interface ReportLedgerInfoMapper extends BaseMapperX<ReportLedgerInfoDO> {

    List<ReportLedgerInfoDO> selectLedgerUnHandle();

    List<ReportLedgerInfoDO> selectLedgerUnHandlePage(@Param("from") int from, @Param("pageSize") int pageSize);

    long countLedgerUnHandle();

    long countLedgerForExport(@Param("req") LedgerReportReqVO req, @Param("statusList")List<String> statusList, @Param("nodeList")List<String> nodeList);
    List<ReportLedgerInfoDO> selectLedgerListForExport(@Param("req") LedgerReportReqVO req, @Param("statusList")List<String> statusList, @Param("nodeList")List<String> nodeList, @Param("from") Integer from, @Param("pageSize") Integer pageSize);

    ReportLedgerInfoDO selectByContractId(@Param("contractId")Long contractId);

    List<ReportLedgerInfoDO> selectAllLedgerByPage(@Param("from") Integer from, @Param("pageSize") Integer pageSize);

    long countRenewalLedgerForExport(@Param("req") RenewalLedgerReportReqVO req, @Param("statusList")List<String> statusList, @Param("nodeList")List<String> nodeList);

    List<ReportLedgerInfoDO> selectRenewalLedgerListForExport(@Param("req") RenewalLedgerReportReqVO req, @Param("statusList")List<String> statusList, @Param("nodeList")List<String> nodeList, @Param("from") Integer from, @Param("pageSize") Integer pageSize);

    void updateDeletedByStatus();

    List<Long> selectContractIdByRenewalAndExchange();

    void updateRentingOutForRenewalAndExchange(@Param("ids")List ids);
}
